package com.senlingspace.system.domain.dto;

import com.senlingspace.common.annotation.Excel;
import com.senlingspace.common.core.domain.BaseEntity;
import com.senlingspace.common.enums.OrderBusinessStatus;
import com.senlingspace.common.enums.TeamStatus;
import com.senlingspace.system.domain.SlkTeamStatus;
import lombok.Data;

@Data
public class TeamStatusDto extends BaseEntity {


    private static final long serialVersionUID = 1L;

    /**
     * 组队主键
     */
    @Excel(name = "组队主键")
    private Long teamId;

    /**
     * 组队名
     */
    @Excel(name = "组队名")
    private String teamName;

    /**
     * 门店ID
     */
    @Excel(name = "门店ID")
    private Long shopId;

    /**
     * 组队状态（ INIT-未使用 CREATE-使用中 BROWSE-浏览中 SUCCESS-已完成）
     */
    @Excel(name = "组队状态", readConverterExp = "I=NIT-未使用,C=REATE-使用中,B=ROWSE-浏览中,S=UCCESS-已完成")
    private String teamStatus;

    /**
     * 组队状态（ INIT-未使用 CREATE-使用中 BROWSE-浏览中 SUCCESS-已完成）
     */
    /*组队状态名*/
    private String teamStatusName;


    /**
     * 队伍总容纳人数
     */
    @Excel(name = "${totalNum}", readConverterExp = "$column.readConverterExp()")
    private int totalNum;

    /**
     * 当前队伍中人数
     */
    @Excel(name = "${curNum}", readConverterExp = "$column.readConverterExp()")
    private int curNum;

    @Excel(name = "设备是否领取", readConverterExp = "0=未领取,1=领取")
    private String isEqument;


    public void setTeamStatus(String teamStatus) {
        this.teamStatus = teamStatus;

        this.teamStatusName = TeamStatus.fromCode(teamStatus).getDescription();
    }
}
